namespace Source.Greeting
{
    public class Greeting
    {
        private readonly ITranslateText translator;
        private string greet;

        public Greeting(ITranslateText translator)
        {
            this.translator = translator;
            this.greet = "Hello";
        }

        public string SayHello(string language, string name)
        {
            if (LanguageIsNotEnglish(language))
            {
                greet = translator.Translate("English",language, "Hello");
            }
            
            return greet + " " + name;
        }

        private static bool LanguageIsNotEnglish(string language)
        {
            return ! language.Equals("English");
        }
    }
}